package Test;

import java.util.*;

public class Test {
    public static void main(String[] args) {
   /*     Cylinder cylinder = new Cylinder();
        double length_a,area_all,volume;
        //设置圆的半径:1.5
        cylinder.setRadius(1.5);
        //设置圆的高:3.0
        cylinder.setLength(3.0);
        length_a=cylinder.findAlength();
        area_all=cylinder.findAllarea();
        volume=cylinder.findVolume();
        System.out.printf("半径为1.5，高为3的圆的底面周长:%.2f\n",length_a);
        System.out.printf("半径为1.5，高为3的圆的表面积:%.2f\n",area_all);
        System.out.printf("半径为1.5，高为3的圆的体积:%.2f\n",volume);
        Kids kids = new Kkids();
        Kkkids kkkids = (Kkkids) kids;
        kids.employeed();
        int sum_i=12;
        float sum_f=12.0f;
        System.out.println(sum_i==sum_f);
        String b="student";
        String string2="student";
        String b=new String("student");
        String string2=new String("student");
        System.out.println(b.equals(string2));
        System.out.println(b==string2);
        Order order1 = new Order(1,"order1");
        Order order2 = new Order(1,"order1");
        System.out.println(order1.equals(order2));
        MyDate myDate1=new MyDate(2021,11,14);
        MyDate myDate2=new MyDate(2021,10,14);
        System.out.println(myDate1.equals(myDate2));
        Integer i =111;
        Integer integer1=Integer.parseInt("111",2);
        Integer integer2=Integer.parseInt("111",8);
        Integer integer3=Integer.parseInt("1111",1,3,2);
        System.out.println(integer1);
        System.out.println(integer2);
        System.out.println(integer3);
        Float float1=Float.parseFloat("123");
        System.out.println(float1);
        Float float2=Float.parseFloat("123");
        int i =123;
        String string1 =String.valueOf(i);
        string1=5+"32";
        System.out.println(string1+"  21");
        SingleOfForm1 single = SingleOfForm1.getSingle1();
        single.show();
        SingleOfForm2 single2 = SingleOfForm2.getSingle2();
        single2.show();
        new Sock();
        new Sock();
        Sock sock = new Sock();
        sock.showAge(1,2);
        Od_test1 od_test1 = new Od_test2();
        od_test1.showName();
        od_test1.showName("true");
        CommonEmployee commonEmployee = new CommonEmployee("chf",2001,"student");
        commonEmployee.work();
        Manager manager = new Manager("chf",2001,"student",100);
        manager.work();
        Teacher teacher = new Teacher(22,"chf","男");
        teacher.showInfo();
        Set set = new Set();
        set.setRadius();
        //按Person_test中的age进行升序排列
        Person_test p1= new Person_test(14,"c");
        Person_test p2= new Person_test(21,"h");
        Person_test p3= new Person_test(17,"f");
        Person_test p4= new Person_test(18,"c");
        Set<Person_test> set = new TreeSet<Person_test>(new Person_test());
        //传入一个对象new Person_test()，在该例中该对象为Comparator的子类
        set.add(p1);
        set.add(p2);
        set.add(p3);
        set.add(p4);

        for (int i=0;i<set.size();i++){
            System.out.println(1);}
        List<String> L =  new ArrayList<String>();
        L.add("1");
        L.add("2");
        L.add(1,"23");

        System.out.println(L.get(2));
        System.out.println(L);
        List<Integer> l = new ArrayList<Integer>();
        l.add(1);
        l.add(1,23);
        l.set(1,3);
        System.out.println(l);

        Map<String,Integer> map= new HashMap<String,Integer>();
        map.put("c",16);
        map.put("d",17);
        map.put("h",20);
        map.put("f",19);
        map.replace("c",20);
        Set<String> keys = map.keySet();
        for(String key:keys){
            System.out.println(key+" "+map.get(key));
        }
        System.out.println(map);
        List<Student> list = new ArrayList<Student>();
        list.add("c");
        list.add("h");
        list.add("f");
        System.out.println(list);
        Collections.reverse(list);
        System.out.println(list);
        Collections.sort(list);
        System.out.println(list);
        Student student1 = new Student(18,"c");
        Student student2 = new Student(19,"h");
        Student student3 = new Student(15,"f");
        Student student4 = new Student(24,"d");
        list.add(student1);
        list.add(student2);        list.add(student3);
        list.add(student4);
        Collections.sort(list,new Student());
        for(Student student:list){
            System.out.println(student.name+"   "+student.age);
        }*/
       /* Father father = new Child();
        father.infoShow();
        Child child =(Child) father;
        child.Show();*/
        Generic<String> generic = new Generic<String>("sadfs");
        generic.setKey("asdf");
        generic.setKey("");
        System.out.println(generic.getKey());


    }
}
/*class Person_test implements Comparator<Person_test>{
     int age;
   String name;

    public Person_test() {
    }

    public Person_test(int age, String name) {
        this.age = age;
        this.name = name;
    }

    @Override
    public int compare(Person_test o1,Person_test o2) {
        if(o1.age>o2.age)
        {
            return 1;
        }
        else if (o1.age<o2.age)
        {
            return -1;
        }
        else
            return 0;


    }
}*/
/*class Student implements Comparator<Student>{
    int age;
    String name;
    public Student() {
    }
    public Student(int age, String name) {
        this.age = age;
        this.name = name;
    }
    @Override
    public int compare(Student o1, Student o2) {
        if(o1.age>o2.age)
        {
            return 1;
        }
        else if (o1.age<o2.age)
        {
            return -1;
        }
        else
            return 0;
    }
}*/
